namespace B.T.BasicData.Read.Api.DTOs
{
    /// <summary>
    /// 登录结果DTO
    /// </summary>
    public class LoginResultDto
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public long UserId { get; set; }
        
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; } = string.Empty;
        
        /// <summary>
        /// 用户状态
        /// </summary>
        public bool Status { get; set; }

        /// <summary>
        /// JWT （Token值）
        /// </summary>
        public string Token {  get; set; }
        
        /// <summary>
        /// 角色信息列表
        /// </summary>
        public List<RoleInfo> Roles { get; set; } = new List<RoleInfo>();
        
        /// <summary>
        /// 权限信息列表
        /// </summary>
        public List<PermissionInfo> Permissions { get; set; } = new List<PermissionInfo>();
    }
    
    /// <summary>
    /// 角色信息
    /// </summary>
    public class RoleInfo
    {
        /// <summary>
        /// 角色ID
        /// </summary>
        public long RoleId { get; set; }
        
        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleName { get; set; } = string.Empty;
    }
    
    /// <summary>
    /// 权限信息
    /// </summary>
    public class PermissionInfo
    {
        /// <summary>
        /// 权限ID
        /// </summary>
        public int PermissionId { get; set; }
        
        /// <summary>
        /// 权限名称
        /// </summary>
        public string PermissionName { get; set; } = string.Empty;
        
        /// <summary>
        /// 权限组件/URL
        /// </summary>
        public string Component { get; set; } = string.Empty;
    }
} 